import React from 'react';
import styles from './RedpacketShare.module.css'

class RedpacketShareModal extends React.Component<{ show: any, onClose: any, children: any }> {
    render() {
        let {show, onClose, children} = this.props;
        if (!show) {
            return null;
        }

        return (
            <div className={styles.share}>
                <div style={{background: 'white', padding: 20, borderRadius: 5}}>
                    <button onClick={onClose}>Close</button>
                    {children}
                </div>
            </div>
        );
    }
}

export default RedpacketShareModal;
